function HandleTableRowSample(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  this._operator = (options && options.operator) ? options.operator : null;
  this._createElements();
};

HandleTableRowSample.prototype._createElements = function() {
  var a, img, _self = this;
  
  a = document.createElement('a');
  if (this._operator.type == '{{$smarty.const.USER_TYPE_MANAGER_ASSISTANT|escape:javascript}}') { 
    a.href = '?p=pageasst&t=pagebackendsample&m=' + JSON.stringify({ a: 5, b: 2 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  } else if (this._operator.type == '{{$smarty.const.USER_TYPE_MANAGER|escape:javascript}}') {
    a.href = '?p=pagemanager&t=pagebackendsample&m=' + JSON.stringify({ a: 5, b: 2 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  } else {
    a.href = '?p=pageadmin&t=pagebackendsample&m=' + JSON.stringify({ a: 5, b: 2 }) + '&opts=' + JSON.stringify({ id: this._item.id });
  }
  a.appendChild(document.createTextNode(this._item.name));
  this._gui.name.appendChild(a);
  
  this._gui.type.appendChild(document.createTextNode(this._item.type));
  this._gui.price.appendChild(document.createTextNode(this._item.price));
  
  img = document.createElement('img');
  img.src = 'images/common/delete.png';
  img.style.cursor = 'pointer';
  img.onclick = function() { _self._loadData(); };
  this._gui.remove.appendChild(img);
};

HandleTableRowSample.prototype._loadData = function() {
  this._packageItem = null;
  this._retrievePackageItems();
};

HandleTableRowSample.prototype._verifyData = function() {
  if (this._packageItem) {
    this._updateElements();
  } else {
    this._updateElements1();
  }
};

HandleTableRowSample.prototype._retrievePackageItems = function(pos) {
  var _self = this;
  /*new RequestUtils()._read('packageitem', null, 'd.sample.oid=' + this._item.id, null, null, null, null, function(result, params) { _self._packageItem = result.data[0];
                                                                                                                                   _self._verifyData.call(_self);
                                                                                                                                 }, null);
*/

  new RequestUtils()._mysql('v1packageitem_s', null, function(result, params) { _self._packageItem = result.data[0];
                                                                          _self._parameters = result;
                                                                          _self._verifyData.call(_self);
                                                                        }, {php:'customphp/mysqlread.php',pos: (pos) ? pos : null }); 
};

HandleTableRowSample.prototype._updateElements = function() {
  var _self = this;
  new RequestUtils()._mwrite('v1sample', [], [this._item], function() { new RequestUtils()._mwrite('v1packageitem', [], [_self._packageItem], function() { _self._options.callbackFunc(); }, null); }, null);
};
HandleTableRowSample.prototype._updateElements1 = function() {
  var _self = this;
  new RequestUtils()._mwrite('v1sample', [], [this._item], function() { _self._options.callbackFunc(); }, null);
};
